package com.controller.Hua;

import com.pojo.Hua.HuaHao;
import com.pojo.Hua.HuaMaterialOutWarehouse;
import com.pojo.Hua.HuaMaterialWarehouse;
import com.pojo.Hua.OutEveryView;
import com.service.Hua.IMaterialWarehouseOutService;
import com.service.Hua.IMaterialWarehouseService;
import com.util.Res;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("huaOutWarehouse/")
public class MaterialWarehouseOutController {
    @Autowired
    IMaterialWarehouseOutService iMaterialWarehouseOutService;


    //获取库存
    @GetMapping("getOutMaterialWarehouse")
    public List<HuaMaterialOutWarehouse> getMaterialWarehouse() {
        List<HuaMaterialOutWarehouse> outWarehouse = iMaterialWarehouseOutService.getOutWarehouse();
        return outWarehouse;
    }

    @GetMapping("getOutWarehouse")
    public Res getOutWarehouse(Long staffId) {
        Res res = iMaterialWarehouseOutService.addOutWarehouse(staffId);
        System.out.println(res);
        return res;
    }

    @GetMapping("getInfo")
    public HuaHao getInfo() {
        HuaHao info = iMaterialWarehouseOutService.getInfo();
        return info;
    }


}
